package com.toy.wms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 库存表
 * </p>
 *
 * @author zcy
 * @since 2025-10-31
 */
public class Inventory implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商品ID
     */
    private Long productId;

    /**
     * 关联采购单ID
     */
    private Long purchaseId;

    /**
     * 存放位置
     */
    private String location;

    /**
     * 状态(in_stock/sold/returned)
     */
    private String status;

    /**
     * 采购总成本
     */
    private BigDecimal purchaseCost;

    /**
     * 建议售价
     */
    private BigDecimal suggestedPrice;

    /**
     * 在库天数
     */
    private Integer storageDays;

    /**
     * 入库日期
     */
    private LocalDate entryDate;

    /**
     * 出库日期
     */
    private LocalDate exitDate;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getPurchaseId() {
        return purchaseId;
    }

    public void setPurchaseId(Long purchaseId) {
        this.purchaseId = purchaseId;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public BigDecimal getPurchaseCost() {
        return purchaseCost;
    }

    public void setPurchaseCost(BigDecimal purchaseCost) {
        this.purchaseCost = purchaseCost;
    }

    public BigDecimal getSuggestedPrice() {
        return suggestedPrice;
    }

    public void setSuggestedPrice(BigDecimal suggestedPrice) {
        this.suggestedPrice = suggestedPrice;
    }

    public Integer getStorageDays() {
        return storageDays;
    }

    public void setStorageDays(Integer storageDays) {
        this.storageDays = storageDays;
    }

    public LocalDate getEntryDate() {
        return entryDate;
    }

    public void setEntryDate(LocalDate entryDate) {
        this.entryDate = entryDate;
    }

    public LocalDate getExitDate() {
        return exitDate;
    }

    public void setExitDate(LocalDate exitDate) {
        this.exitDate = exitDate;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Inventory{" +
        "id = " + id +
        ", productId = " + productId +
        ", purchaseId = " + purchaseId +
        ", location = " + location +
        ", status = " + status +
        ", purchaseCost = " + purchaseCost +
        ", suggestedPrice = " + suggestedPrice +
        ", storageDays = " + storageDays +
        ", entryDate = " + entryDate +
        ", exitDate = " + exitDate +
        ", createTime = " + createTime +
        ", updateTime = " + updateTime +
        "}";
    }
}
